# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-srsly
_pkgname=srsly
pkgver=2.5.1
pkgrel=1
pkgdesc='Modern high-performance serialization utilities for Python.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/srsly/'
license=('MIT')
depends=('python' 'cython' 'python-catalogue' 'python-pytest'
         'python-pytest-timeout' 'python-pytz' 'python-mock' 'python-numpy')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9c5ef988c0b24c265d3db12064fba2fc3d9a57c08a2827c8334c5ca825c2d7bb248430b10a3a098c32381406d7a1ecba0a4c497ad0b9ab9e1f900461a5876a1c')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

	pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

